package com.kimo.shop.common.config;

import java.util.HashSet;

/**
 * @author kimo-taozhouchuan
 * @date 2021/8/6 14:32
 */
public class SensitiveWordConfig {

    private static final String WEBJARS_URL ="/admin/webjars/**";
    private static final String SWAGGER_URL ="/admin/swagger/**";
    private static final String API_DOCS_URL ="/admin/v2/api-docs";
    private static final String DOC_URL ="/admin/doc.html";
    private static final String SWAGGER_UI_URL ="/admin/swagger-ui.html";
    private static final String SWAGGER_RESOURCES_URL ="/admin/swagger-resources/**";
    private static final String CAPTCHA_URL ="/admin/captcha.jpg";
    private static final String SAVE_CONFIG ="/admin/sys/pconfig/save";
    private static final String GET_SENSITIVE_WORD ="/admin/sys/pconfig/info/SENSITIVE_WORDS";
    /**
     * 导出excel
     */
    private static final String SOLD_EXCEL ="/admin/order/order/soldExcel";
    private static final String IMPORT_USER_MODEL ="/admin/admin/user/importUserModel";
    private static final String FORM_EXCEL ="/admin/admin/form/formExcel";
    private static final String EXPORT_USER ="/admin/admin/user/exportUser";
    private static final String UN_DELIVERY_ORDER_EXCEL ="/admin/order/order/unDeliveryOrderExcel";
    private static final String DOWNLOAD_MODEL ="/admin/prod/prod/downloadModel";
    private static final String EXPORT_PROD ="/admin/prod/prod/exportProd";
    private static final String GET_FIN_DETAIL_FORM ="/admin/platform/financialManagement/getFinanDetailForm";
    private static final String EXPORT_RETAIL_PROD ="/admin/shop/retailProd/exportRetailProd";
    private static final String IMPORT_RETAIL_PROD_MODEL ="/admin/shop/retailProd/importRetailProdModel";

    private static final String GET_USER_MENU ="/admin/sys/menu/nav";

    static final HashSet<String> SENSITIVE_WHITE_SET;
    static {
        SENSITIVE_WHITE_SET = new HashSet<>();
        SENSITIVE_WHITE_SET.add(WEBJARS_URL);
        SENSITIVE_WHITE_SET.add(SWAGGER_URL);
        SENSITIVE_WHITE_SET.add(API_DOCS_URL);
        SENSITIVE_WHITE_SET.add(DOC_URL);
        SENSITIVE_WHITE_SET.add(SWAGGER_UI_URL);
        SENSITIVE_WHITE_SET.add(SWAGGER_RESOURCES_URL);
        SENSITIVE_WHITE_SET.add(CAPTCHA_URL);
        SENSITIVE_WHITE_SET.add(SAVE_CONFIG);
        SENSITIVE_WHITE_SET.add(SOLD_EXCEL);
        SENSITIVE_WHITE_SET.add(IMPORT_USER_MODEL);
        SENSITIVE_WHITE_SET.add(FORM_EXCEL);
        SENSITIVE_WHITE_SET.add(EXPORT_USER);
        SENSITIVE_WHITE_SET.add(UN_DELIVERY_ORDER_EXCEL);
        SENSITIVE_WHITE_SET.add(DOWNLOAD_MODEL);
        SENSITIVE_WHITE_SET.add(EXPORT_PROD);
        SENSITIVE_WHITE_SET.add(GET_FIN_DETAIL_FORM);
        SENSITIVE_WHITE_SET.add(EXPORT_RETAIL_PROD);
        SENSITIVE_WHITE_SET.add(IMPORT_RETAIL_PROD_MODEL);
        SENSITIVE_WHITE_SET.add(GET_SENSITIVE_WORD);
        SENSITIVE_WHITE_SET.add(GET_USER_MENU);
    }

    private SensitiveWordConfig() {

    }

    public static HashSet<String> getSensitiveWhiteSet() {
        return SENSITIVE_WHITE_SET;
    }
}
